
import 'package:flutter/material.dart';
import 'package:fluro/fluro.dart';

import 'package:logging/logging.dart';


import './route_handlers.dart';


final _logger = new Logger("route handler");

class AppRoutes {
  
  static String splash = "/splash"; //启动页
  static String root = "/";
  static String home_screen = "/home"; // 主页
  static String order_screen = "/wborder"; // 订单
  static String mine_screen = "/mine"; // 我的
  
  static String signin_screen = "/signin"; // 注册
  static String signup_screen = "/signup"; // 注册
  static String findpassword_screen = "/findpassword"; // 注册
  static String resetpassword_screen = "/resetpassword"; // 注册


  static void configureRoutes(Router router) {
    
    router.notFoundHandler = new Handler(handlerFunc: (BuildContext context, Map<String, List<String>> params) {
      _logger.warning("ROUTE WAS NOT FOUND !!!");
    });

    router.define(root, handler: rootHandler);

    router.define(splash, handler: splashHandler);
    router.define(home_screen, handler: homeHandler);
    router.define(order_screen, handler: orderHandler);
    router.define(mine_screen, handler: mineHandler);
    
    router.define(signin_screen, handler: signinHandler);
    router.define(signup_screen, handler: signupHandler);
    router.define(findpassword_screen, handler: findpasswordHandler);
    router.define(resetpassword_screen, handler: resetpasswordHandler);

  }


}